package org.jeecg.modules.htxincailiao.account.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.common.util.SmartVerificationUtil;
import org.jeecg.modules.htxincailiao.account.constant.HTAccountTypeEnum;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;


@Data
public class HTUserDTO {

    @ApiModelProperty(value = "入驻用户类型: 0-普通用户 1-问答库专家 2-普通企业 3-评估机构 4-联盟成员")
    private HTAccountTypeEnum accountType;

    /**手机号*/
    @NotEmpty(message = "手机号不能为空")
    @Pattern(regexp = SmartVerificationUtil.PHONE_REGEXP, message = "手机号格式不正确")
    @ApiModelProperty(value = "手机号")
    private String phoneNumber;

    /** 验证码 */
    @NotEmpty(message = "验证码不能为空")
    @ApiModelProperty(value = "验证码")
    private String captcha;


    /**用户名*/
    @NotEmpty(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名")
    private String username;

    /**密码*/
    @NotEmpty(message = "密码不能为空")
    @Length(min = 8, message = "密码最少为6位字符")
    @ApiModelProperty(value = "密码")
    private String password;


    /** 1普通用户 */

    /**姓名*/
    @ApiModelProperty(value = "姓名")
    private String realName;

    /**昵称*/
    @ApiModelProperty(value = "昵称")
    private String nickname;





    /**工号*/
    @ApiModelProperty(value = "工号")
    private String workNum;

    /**地址ID*/
    @ApiModelProperty(value = "地址ID")
    private String addressId;


    /**头像*/
    @ApiModelProperty(value = "头像")
    private String avatar;

    /**性别*/
    @Dict(dicCode = "sex")
    @ApiModelProperty(value = "性别")
    private Integer gender;


    /**生日*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "生日")
    private java.util.Date birthday;


    /**会员邮箱*/
    @ApiModelProperty(value = "会员邮箱")
    private String email;


    /**邮编*/
    @ApiModelProperty(value = "邮编")
    private String zipcode;


    /**职位*/
    @ApiModelProperty(value = "职位")
    private String position;


    /**简介*/
    @ApiModelProperty(value = "简介")
    private String introduction;


    /**逻辑删除：1表示删除，0表示未删除。*/
    @ApiModelProperty(value = "逻辑删除：1表示删除，0表示未删除。")
    private Integer isDeleted;
}
